package com.bwie.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.bwie.utils.R;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.pojo.Dict;
import com.bwie.mapper.DictMapper;
import com.bwie.service.DictService;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements DictService{
    @Autowired
    private DictMapper dictMapper;
    @Override
    public R getDict(Integer dictType) {
        List<Dict> dicts = dictMapper.selectList(
                new QueryWrapper<Dict>().lambda().eq(Dict::getDictType, dictType)
        );
        return R.OK(dicts);
    }
}
